<?php 
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$formuser = $this->formfilter;
$url_userwu = $this->url(array('module'=>'userWu','controller'=>'user','action'=>'index',));
$url_userwu_edit = $this->url(array('module'=>'userWu','controller'=>'user','action'=>'edit-user',));
$url_userwu_add = $this->url(array('module'=>'userWu','controller'=>'user','action'=>'add-user',));
?>
<?php 
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$session_user=new Zend_Session_Namespace('auth');
$request=Zend_Controller_Front::getInstance()->getRequest();
$user_info = new Application_Model_DbTable_DbGetUserInfo();
$result = $user_info->getUserInfo();
?>
<style>
.dataTables_length{ padding:10px 0 0 10px;}
.dataTables_info{ 
padding: 5px 0px 0px 20px;
font-size: 15px;}
.dataTables_filter{ float: right; padding-right:10px; padding-top:10px;}
.dataTables_paginate,paging_simple_numbers{ 
float: right;
padding-right: 10px;
padding-bottom: 20px;}
.navbar-right{margin: 4px;}
tr{font-size: 15px;}
td{font-size: 14px;}
.nav>li>a:hover, .nav>li>a:focus {
text-decoration: none;
color: #FFF;
background-color: #5380AA !important;
padding: 14px;
margin: -4px -3px 0px 0px;
}
.td_name{
text-align: left !important;
padding-left: 20px !important;
}
.brand-menu h1{
text-align: center;
width: 100%;
position: absolute;
color: #38A3D6;
margin: 0px;
font-weight: bold;
}
@media (max-width: 1124px){
	.col-lg-3{float: left; } 
	.brand-menu h1{ font-size: 25px !important; text-align:center; left: 100px; width: 40%; margin: 5px auto;}
}
</style>
<link href="<?php echo $this->baseUrl()?>/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl()?>/css/layout.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/font-awesome.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
<link href="<?php echo $this->baseUrl(); ?>/css/sb-admin.css" rel="stylesheet">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="max-width: 1280px; margin: 0 auto; box-shadow: 0px -5px 13px #8A8A8A; border: 0; background: #38A3D6;">
 		  <a style="border: 0; " class="navbar-brand" href="<?php echo $this->baseUrl(); ?>/index/dashboad">
			<div style="text-align: center; color: #FFF; font-weight: bold; font-size: 25px; margin: -15px 0px 0px 0px;">Western University
				<img style="height: 50px; padding: 0; margin-left: 5px; margin-right: 5px;" src="<?php echo $this->baseUrl(); ?>/images/bg_logo.png" width="30"/>
			</div>
		  </a>
	<div class="navbar-header">
       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
       <span class="sr-only">Toggle navigation</span>
       <span class="icon-bar"></span>
       <span class="icon-bar"></span>
       <span class="icon-bar"></span>
       </button>
   </div>
               <!-- /.navbar-header -->
   <ul class="nav navbar-top-links navbar-right">
      <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#" style="color: #FFF;">
            <i class="fa fa-user fa-fw"></i> <?php echo ucwords(strtolower($session_user->fullname));?>  <i class="fa fa-caret-down"></i>
          </a>
          <ul class="dropdown-menu dropdown-user">
             <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a></li>
             <li><a href="<?php echo $this->url(array('module'=>'userWu','controller'=>'user','action'=>'view-user', 'id'=>$session_user->user_id));?>"><i class="fa fa-gear fa-fw"></i> Settings</a></li>
             <li class="divider"></li>
             <li><a href="<?php echo $this->url(array('module'=>'','controller'=>'index','action'=>'logout', 'value'=>1));?>"><i class="fa fa-sign-out fa-fw"></i> Logout</a></li>
          </ul>
        <!-- /.dropdown-user -->
     </li>
 <!-- /.dropdown -->
    </ul>
     <!-- /.navbar-top-links -->
    </nav>    
<form action="<?php echo $url_userwu;?>" method="post" id="frm">
    <div id="wrapper" style="height: auto;">
      <div id="page-wrapper" style="background: #FFF">
		<div class="col-lg-3" style="margin: 4px 0px 0px -13px;">    
			<a href="<?php echo $this->baseUrl(); ?>/index/dashboad">
				<button type="button" class="btn btn-primary"><i class="fa fa-backward"></i> &nbsp; Back</button>
			</a>
		</div>  
		<div class="brand-menu col-lg-6">
			<h1>Menu of User</h1>
		</div>
		<div class="panel-heading" style="float: right; margin: -7px -14px 10px 0px;">    	   
               	    <a href="<?php echo $url_userwu;?>">
               	    <button type="button" class="btn btn-small btn-success">
					<b><i class="fa fa-plus"></i></b> &nbsp;Add New 
					</button>
					</a>
					<button class="btn btn-small btn-warning" name="edit" value="edit">
					<b><i class="fa fa-check-circle-o"></i></b> &nbsp;Edit					 
					</button>
					<button class="btn btn-small btn-danger" name="delete" value="delete">
					<b><i class="fa fa-trash-o"></i></b> &nbsp;Delete					 
					</button> 
        </div>
        <div style="clear: both;" ></div>
                  
          <div class="row">
               <div class="col-lg-12">                  
                   <div class="panel panel-default">
                        <!-- /.panel-heading -->
                        <div>
                            <div class="table-responsive">
                               <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th>Check</th>
                                            <th>ID</th>
                                            <th>User Name</th>
                                            <th>Created Date</th>  
                                            <th>Published</th>
                                            <th>Edit</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php foreach ($formuser as $userform){?>
                                        <tr>
                                            <td style="">
                                        	<?php 
                                        		echo "<input type='checkbox' title='".$userform["username"]."' name='chk_modify' value='".$userform["user_id"]."' />";
											?>
											</td>
                                            <td><?php echo $userform["user_id"];?></td>
                                            <td class="td_name"><a href="<?php echo $url_userwu_edit."/id/".$userform["user_id"]?>" ><?php echo $userform["username"];?></a></td>
                                            <td><?php echo $userform["created_date"];?></td>
                                           
                                            <td>
                                            	<?php 
                                            	if($userform["status"]==1){ ?> 
                                            		<button name="status" value="<?php echo $userform["user_id"]?>" class="btn btn-info btn-circle"><i class="fa fa-check"></i></button> 
                                            	<?php }
                                            	if($userform["status"]==0){?>
                                            		<button name="unstatus" value="<?php echo $userform["user_id"]?>" class="btn btn-danger"><i class="fa fa-times"></i></button>
                                            
                                            	<?php }?>
                                            </td>
                                            <td>
                                            	<a href="<?php echo $url_userwu_edit."/id/".$userform["user_id"]?>">
                                            		<button type="button" class="btn btn-success"><i class="fa fa-check-circle-o"></i></button>
                                            	</a>
                                            </td>
                                        </tr>
                    				<?php }?>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
             <!-- /.col-lg-6 -->
        </div><!-- /#page-row -->
      </div><!-- /#page-wrapper -->
  </div><!-- /#wrapper -->
</form> 

<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl(); ?>/gif/style.css">
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl(); ?>/gif/script.js"></script>
<script src="http://project.dimpost.com/image-slider/js-image-slider-1.js" type="text/javascript"></script>
<script src="http://project.dimpost.com/image-slider/js-image-slider-2.js" type="text/javascript"></script>
<script type="text/javascript">
    $(window).load(function () {
        $('#slider').nivoSlider({ directionNav: false, effect: 'fade', animSpeed: 500, pauseTime: 8000 });
    });
</script>
&nbsp
<div style="
WIDTH: 100%;
text-align: center;
border-top: 5px solid #38A3D6;
margin: -20px 0px 0px 0px;
box-shadow: 0px 0px 13px #8A8A8A !important;">
	<div id="slider-wrapper">
		<div id="slider" class="nivoSlider" style="position: relative; width: 100%; height: 183px;; background-position: initial initial; background-repeat: no-repeat no-repeat; ">			
					<a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner.jpg" border="0" style="display: none; " />
				    </a>		
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner1.jpg" border="0" style="display: none; " />
				    </a>	
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner2.jpg" border="0" style="display: none; " />
				    </a>
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner3.jpg" border="0" style="display: none; " />
				    </a>
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner4.jpg" border="0" style="display: none; " />
				    </a>
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner5.jpg" border="0" style="display: none; " />
				    </a>
				    <a href="" title="" class="nivo-imageLink" style="display: none; ">
						<img src="<?php echo $this->baseUrl(); ?>/images/banner/banner6.jpg" border="0" style="display: none; " />
				    </a>
				    
 </div> 
 </div>

  <div class="footer">
            Address: #15, Street 528, Sangkat Boeungkok I, Khan Toul Kork, Phnom Penh, CAMBODIA.<br />
            Tell: 023 998 233, Email: <a href="mailto://info_wu@western.edu.kh">info_wu@western.edu.kh</a>, Website: <a href="http://www.western.edu.kh" target="_blank">www.western.edu.kh</a>
</div>
</div>

    <script src="<?php echo $this->baseUrl(); ?>/js/jquery-1.10.2.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/bootstrap.min.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/metisMenu/jquery.metisMenu.js"></script>

    <!-- Page-Level Plugin Scripts - Tables -->
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="<?php echo $this->baseUrl(); ?>/js/plugins/dataTables/dataTables.bootstrap.js"></script>

    <!-- SB Admin Scripts - Include with every page -->
    <script src="<?php echo $this->baseUrl(); ?>/js/sb-admin.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
    <script>
    $(document).ready(function() {
        $('#dataTables-example').dataTable();
    });
    </script>